package cn.kgc.ffzw.day18.homework.chihuolianmeng;

import java.util.Scanner;

/**
 * @author dyy
 * @version 1.0
 * @date 2019/11/23
 * @Description
 * @since JDK1.8
 */
public class Customer extends PlatForm {
    Scanner d=new Scanner(System.in);
    private String[] step={"我要订餐","查看餐袋","删除订单","签收订单","我要点赞","返回主页","输入0退出"};

    public Customer(InfoList infoList, OrederList orederList) {
        super(infoList, orederList);
    }

    public void platlist() {
        for (int i = 0; i < step.length; i++) {
            System.out.println((i+1)+". "+step[i]);
        }
        System.out.println("请选择要进入的项目：");
        setChoice(d.nextInt());
    }

    @Override
    public void dosth() {
        this.platlist();
        do {
            switch (getChoice()){
                case 1:
                    this.order();
                    break;
                case 2:
                    this.check();
                    break;
                case 3:
                    this.deletorder();
                    break;
                case 4:
                    this.signorder();
                    break;
                case 5:
                    this.like();
                    break;
                case 6:
                    break;
                    default:
                        return;
            }
            this.platlist();
        }while (getChoice()<7);
    }

    @Override
    public void like() {
        super.like();
    }

    @Override
    public void check() {
        super.check();
    }

    @Override
    public void order() {
        super.order();
    }

    @Override
    public void deletorder() {
        super.deletorder();
    }

    @Override
    public void signorder() {
        super.signorder();
    }
}
